echo -e "[archlinuxcn]\nServer = https://mirrors.bfsu.edu.cn/archlinuxcn/\$arch" |sudo tee -a /etc/pacman.conf
sudo pacman -Syyu
sudo pacman-key --lsign-key "farseerfc@archlinux.org"
sudo pacman -S archlinuxcn-keyring --noconfirm
sudo pacman -S yay zsh --noconfirm
yay -S fcitx fcitx-configtool fcitx-qt5 fcitx-qt6 fcitx-sogoupinyin thunderbird thunderbird-i18n-zh-cn vlc zvbi spotify visual-studio-code-bin latte-dock linuxqq telegram-desktop simplenote-electron-bin netease-cloud-music-gtk4 obsidian obs-studio wps-office-cn wps-office-mui-zh-cn wemeet-bin go python-pip openjdk17-src --noconfirm
#yay -S electron22-bin motrix --noconfirm


echo -e "can you use google?\n1.yes  2.no"
read google
if [ $google -eq 1 ];then
yay -S firefox firefox-i18n-zh-cn google-chrome microsoft-edge-stable-bin --noconfirm
else
yay -S firefox firefox-i18n-zh-cn firefox-adblock-plus firefox-ublock-origin  microsoft-edge-stable-bin chromium chromium-extension-ublock-origin --noconfirm
fi

echo "something may retry when useful"

yay -S ttf-wps-fonts  kodi kodi-addon-pvr-iptvsimple yesplaymusic --noconfirm


echo "more ttf at ttf-ms-win11-auto-zh_cn ttf-ms-win10-auto....(yay -Ss ttf-ms)"

echo -e "export GTK_IM_MODULE=fcitx\nexport QT_IM_MODULE=fcitx\nexport XMODIFIERS=\"@im=fcitx\"" > ~/.xprofile
sudo sed -i 's/Exec=\/opt\/Simplenote\/simplenote %U/Exec=\/opt\/Simplenote\/simplenote --no-sandbox %U/g' /usr/share/applications/simplenote.desktop

sudo sed -i '/\[multilib\]/{s/#//;n;s/#//}' /etc/pacman.conf
yay -Syyu
yay -S com.qq.weixin.spark --noconfirm


sh -c "$(curl -fsSL https://gitee.com/pocmon/ohmyzsh/raw/master/tools/install.sh)"

echo "everthing ok?"
echo "more settings goto https://zhuanlan.zhihu.com/p/461393131"
echo "vaapi to ~/.config/chrome-flags.conf  ~/.config/chromium-flags.conf  ~/.config/microsoft-edge-stable-flags.conf for hardware accelaration"
read $ok

